package 开始的剑指offer8月.动态规划;
// https://leetcode-cn.com/problems/qing-wa-tiao-tai-jie-wen-ti-lcof/
public class 剑指Offer10II青蛙跳台阶问题0820 {
    class Solution {
        public int numWays(int n) {
            int a = 1, b = 1, sum;
            for(int i = 0; i < n; i++){
                sum = (a + b) % 1000000007;
                a = b;
                b = sum;
            }
            return a;
        }
    }

}
